Fix dof and background motion vectors on webgpu#23629
Merged
alice-i-cecile merged 5 commits intobevyengine:mainfrom Apr 28, 2026
Merged
Fix dof and background motion vectors on webgpu#23629alice-i-cecile merged 5 commits intobevyengine:mainfrom
alice-i-cecile merged 5 commits intobevyengine:mainfrom
Conversation
3defd77 to
1d747f3
Compare
alice-i-cecile
approved these changes
Apr 26, 2026
eswartz
reviewed
Apr 26, 2026
Contributor
eswartz
left a comment
There was a problem hiding this comment.
I ran the two mentioned examples using bevy run --example {skybox,depth_of_field} -Fwebgpu,free_camera web under Google Chrome Version 147.0.7727.116 (Official Build) (64-bit) on Linux/X11 with the webgpu options enabled.
They work!
eswartz
suggested changes
Apr 27, 2026
Contributor
There was a problem hiding this comment.
Eep, this consistently generates
@ 127.0.0.1:4000/build/skybox.js:3678
ERROR crates/bevy_render/src/error_handler.rs:114 Caught rendering error: Color target has no corresponding fragment stage output but writeMask (ColorWriteMask::(Red|Green|Blue|Alpha)) is not zero. - While validating targets[0] framebuffer output. - While validating fragment state. - While calling [Device].CreateRenderPipeline([RenderPipelineDescriptor ""background_motion_vectors_pipeline""]).
127.0.0.1:4000/:1 Color target has no corresponding fragment stage output but writeMask (ColorWriteMask::(Red|Green|Blue|Alpha)) is not zero.
- While validating targets[0] framebuffer output.
- While validating fragment state.
- While calling [Device].CreateRenderPipeline([RenderPipelineDescriptor ""background_motion_vectors_pipeline""]).
via bevy run --example skybox -Fwebgpu,free_camera web
(depth_of_field does work though)
tychedelia
pushed a commit
to processing/bevy
that referenced
this pull request
Apr 30, 2026
# Objective WebGPU-only fix extracted from bevyengine#22554 and bevyengine#22555. Fixes bevyengine#20459 ## Solution Fix normal + motion vector prepass by setting write mask to empty. This is a firefox/wgpu bug that it's not validated gfx-rs/wgpu#9147, but chromium does. Fix dof with bokeh mode. I guess it's `naga_oil` bug but I'm not sure. ## Testing I tested dof and skybox examples on web.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
WebGPU-only fix extracted from #22554 and #22555. Fixes #20459
Solution
Fix normal + motion vector prepass by setting write mask to empty. This is a firefox/wgpu bug that it's not validated gfx-rs/wgpu#9147, but chromium does.
Fix dof with bokeh mode. I guess it's
naga_oilbug but I'm not sure.Testing
I tested dof and skybox examples on web.